package org.oa.ai.model.impl;


import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.chat.StreamingChatLanguageModel;
import dev.langchain4j.model.ollama.OllamaChatModel;
import dev.langchain4j.model.ollama.OllamaStreamingChatModel;
import org.oa.ai.model.ModelProcessor;

public class DeepseekR1Model implements ModelProcessor {

    @Override
    public String chatMessage(String message) {

        ChatLanguageModel model = OllamaChatModel.builder()
                .baseUrl("http://localhost:11434")
                .modelName("deepseek-r1:8b")
                .temperature(0.0)
                .build();
        String chat = model.chat(message);
        return chat;
    }

    @Override
    public StreamingChatLanguageModel chatMessageStream() {
        StreamingChatLanguageModel model = OllamaStreamingChatModel.builder()
                .baseUrl("http://localhost:11434")
                .modelName("deepseek-r1:8b")
                .temperature(0.8)
                .build();
       return model;
    }

}
